home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / WOLFSRC.ZIP / WOLFSRC.1 / ID_US.H < prev    next >
C/C++ Source or Header  |  1993-02-04  |  3KB  |  124 lines

  1. //
  2. //    ID Engine
  3. //    ID_US.h - Header file for the User Manager
  4. //    v1.0d1
  5. //    By Jason Blochowiak
  6. //
  7.  
  8. #ifndef    __ID_US__
  9. #define    __ID_US__
  10.  
  11. #ifdef    __DEBUG__
  12. #define    __DEBUG_UserMgr__
  13. #endif
  14.  
  15. //#define    HELPTEXTLINKED
  16.  
  17. #define    MaxX    320
  18. #define    MaxY    200
  19.  
  20. #define    MaxHelpLines    500
  21.  
  22. #define    MaxHighName    57
  23. #define    MaxScores    7
  24. typedef    struct
  25.         {
  26.             char    name[MaxHighName + 1];
  27.             long    score;
  28.             word    completed,episode;
  29.         } HighScore;
  30.  
  31. #define    MaxGameName        32
  32. #define    MaxSaveGames    6
  33. typedef    struct
  34.         {
  35.             char    signature[4];
  36.             word    *oldtest;
  37.             boolean    present;
  38.             char    name[MaxGameName + 1];
  39.         } SaveGame;
  40.  
  41. #define    MaxString    128    // Maximum input string size
  42.  
  43. typedef    struct
  44.         {
  45.             int    x,y,
  46.                 w,h,
  47.                 px,py;
  48.         } WindowRec;    // Record used to save & restore screen windows
  49.  
  50. typedef    enum
  51.         {
  52.             gd_Continue,
  53.             gd_Easy,
  54.             gd_Normal,
  55.             gd_Hard
  56.         } GameDiff;
  57.  
  58. //    Hack import for TED launch support
  59. extern    boolean        tedlevel;
  60. extern    int            tedlevelnum;
  61. extern    void        TEDDeath(void);
  62.  
  63. extern    boolean        ingame,        // Set by game code if a game is in progress
  64.                     abortgame,    // Set if a game load failed
  65.                     loadedgame,    // Set if the current game was loaded
  66.                     NoWait,
  67.                     HighScoresDirty;
  68. extern    char        *abortprogram;    // Set to error msg if program is dying
  69. extern    GameDiff    restartgame;    // Normally gd_Continue, else starts game
  70. extern    word        PrintX,PrintY;    // Current printing location in the window
  71. extern    word        WindowX,WindowY,// Current location of window
  72.                     WindowW,WindowH;// Current size of window
  73.  
  74. extern    boolean        Button0,Button1,
  75.                     CursorBad;
  76. extern    int            CursorX,CursorY;
  77.  
  78. extern    void        (*USL_MeasureString)(char far *,word *,word *),
  79.                     (*USL_DrawString)(char far *);
  80.  
  81. extern    boolean        (*USL_SaveGame)(int),(*USL_LoadGame)(int);
  82. extern    void        (*USL_ResetGame)(void);
  83. extern    SaveGame    Games[MaxSaveGames];
  84. extern    HighScore    Scores[];
  85.  
  86. #define    US_HomeWindow()    {PrintX = WindowX; PrintY = WindowY;}
  87.  
  88. extern    void    US_Startup(void),
  89.                 US_Setup(void),
  90.                 US_Shutdown(void),
  91.                 US_InitRndT(boolean randomize),
  92.                 US_SetLoadSaveHooks(boolean (*load)(int),
  93.                                     boolean (*save)(int),
  94.                                     void (*reset)(void)),
  95.                 US_TextScreen(void),
  96.                 US_UpdateTextScreen(void),
  97.                 US_FinishTextScreen(void),
  98.                 US_DrawWindow(word x,word y,word w,word h),
  99.                 US_CenterWindow(word,word),
  100.                 US_SaveWindow(WindowRec *win),
  101.                 US_RestoreWindow(WindowRec *win),
  102.                 US_ClearWindow(void),
  103.                 US_SetPrintRoutines(void (*measure)(char far *,word *,word *),
  104.                                     void (*print)(char far *)),
  105.                 US_PrintCentered(char far *s),
  106.                 US_CPrint(char far *s),
  107.                 US_CPrintLine(char far *s),
  108.                 US_Print(char far *s),
  109.                 US_PrintUnsigned(longword n),
  110.                 US_PrintSigned(long n),
  111.                 US_StartCursor(void),
  112.                 US_ShutCursor(void),
  113.                 US_CheckHighScore(long score,word other),
  114.                 US_DisplayHighScores(int which);
  115. extern    boolean    US_UpdateCursor(void),
  116.                 US_LineInput(int x,int y,char *buf,char *def,boolean escok,
  117.                                 int maxchars,int maxwidth);
  118. extern    int        US_CheckParm(char *parm,char **strings),
  119.                 US_RndT(void);
  120.  
  121.         void    USL_PrintInCenter(char far *s,Rect r);
  122.         char     *USL_GiveSaveName(word game);
  123. #endif
  124.